package com.maven.springaop.demos.controller;


import com.maven.springaop.demos.aspect.TimeAspect;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/t1")
    public String t1() {
        log.info("t1 执行");
        return "t1";
    }

    @TimeAspect
    @RequestMapping("/t2")
    public String t2() {
        log.info("t2 执行");
        return "t2";
    }
}
